import greenfoot.*;  // (World, Actor, GreenfootImage, Greenfoot and MouseInfo)

/**
 * This class indicates certain weapon that the Player is wielding.
 * 
 * @author Manuel Nava
 * @version 1.0
 */
public class Square extends Actor
{
    private GreenfootImage axe;
    private GreenfootImage sword;
    private GreenfootImage nothing;
    
    /**
     * The constructor loads the images that the square will take.
     */
    public Square()
    {
        axe= new GreenfootImage("square1.png");
        sword= new GreenfootImage("square2.png");
        nothing= new GreenfootImage("square0.png");
    }
    
    /**
     * The method act is empty in this class.
     */
    public void act() 
    {
        
    } 
    
    /**
     * This metod sets the image to this class. Receives a value that will indicates the image to set.
     */
    public void setImage(int d)
    {
        switch(d)
        {
            case 1: setImage(axe);
            break;
            case 2: setImage(sword);
            break;
            case 0: setImage(nothing);
            break;
        }
    }
}
